package com.kun.portal.webframe.util;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;



/**
 * Created by Administrator on 2018/7/9.
 */
@Component
@Aspect
public class LazyIgnoreAcpect  {
    //
    @Pointcut("@annotation(com.kun.portal.webframe.util.LazyIgnore)")
    public void lazyIgnoreAcpect() {

    }
    @Around("lazyIgnoreAcpect()")
    public  Object around(ProceedingJoinPoint joinPoint) {

        System.out.println(  "locked/...............");
        Object obj = null;
        try {
            obj = joinPoint.proceed();
        } catch (Throwable e) {
//            e.printStackTrace();
            return null;
        } finally{
            System.out.println(  "unununulocked/...............");
        }
        return obj;
    }



}
